package com.jz.community.moduleshopping.cardGoods.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jz.community.basecomm.glideConfig.GlideApp;
import com.jz.community.moduleshopping.R;
import com.jz.community.moduleshopping.cardGoods.info.CardBrandInfo;

import java.util.List;

import de.hdodenhof.circleimageview.CircleImageView;

/**
 * Created by Tony.Fan on 2018/8/16 11:01
 */
public class CardBrandAdapter extends BaseQuickAdapter<CardBrandInfo.EmbeddedBeanXXX.ContentBeanXX, BaseViewHolder> {

    public CardBrandAdapter(@Nullable List<CardBrandInfo.EmbeddedBeanXXX.ContentBeanXX> data) {
        super(R.layout.module_shopping_card_brand_item_layout, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CardBrandInfo.EmbeddedBeanXXX.ContentBeanXX item) {
        CircleImageView item_card_brand_iv = helper.getView(R.id.item_card_brand_iv);
        GlideApp.with(mContext)
                .load(item.getBrandIcon())
                .placeholder(R.mipmap.image_default)
                .error(R.mipmap.image_default)
                .into(item_card_brand_iv);
    }
}
